#!/bin/bash
cat /etc/passwd > ~/work4.log
cat /etc/group >> ~/work4.log
echo 'Будь бдителен!' > /etc/skel/examples.desktop 
useradd ul --password 12345678
groupadd g1 && adduser u1 g1
grep 'g1' /etc/group >> ~/work4.log
userdel u1 --remove-all-files; delgroup g1
for N in 1 2 3 4; do echo 't'$N':123456p'$N':::::'; done; > ~/users.list
newusers ~/users.list
table.txt >> ~/work4.log
mkdir ~/test4; cp ~/work4.log ~/test4/work4-1.log; cp ~/work4.log ~/test4/work4-2.log; cp `/work4.log ~/test4/work4-3.log
groupadd g1; adduser t1 g1; adduser t2 g1; adduser t3 g1; adduser t4 g1
echo ~/test4/work4-1.log ~/test4/work4-2.log ~/test4-3.log | xargs chown t1
chmod u=rw ~/test4; chmod o= ~/test4; 
echo ~/test4/work4-1.log ~/test4/work4-2.log ~/test4/work4-3.log | xargs chmod g=r
mkdir ~/test5; chmod 1777 ~/test5;
echo '#!/bin/bash rm ~test4/work4-2.log' > ~/rmwork.sh
chmod u+s ~/rmwork.sh
